package com.zyd.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 体检套餐
 */
@Data
@TableName("t_setmeal")
public class Setmeal implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("name")  // 显式指定数据库列名
    private String name;

    @TableField("code")
    private String code;

    @TableField("helpcode")  // 注意：表中为全小写
    private String helpCode;

    @TableField("sex")
    private String sex;

    @TableField("age")
    private String age;

    @TableField("price")
    private Float price;

    @TableField("remark")
    private String remark;

    @TableField("attention")
    private String attention;

    @TableField("img")
    private String img;

    @TableField(exist = false)
    @JsonIgnore  // 忽略非数据库字段
    private List<CheckGroup> checkGroups; // 关联的检查组列表
}

//
//@Data
//@TableName("t_setmeal")
//public class Setmeal implements Serializable {
//    private static final long serialVersionUID = 1L;
//
//    @TableId(value = "id", type = IdType.AUTO)
//    private Integer id;
//    private String name;
//    private String code;
//    private String helpCode;
//    private String sex;//套餐适用性别：0不限 1男 2女
//    private String age;//套餐适用年龄
//    private Float price;//套餐价格
//    private String remark;
//    private String attention;
//    private String img;//套餐对应图片存储路径
//    @TableField(exist = false)
//    private List<CheckGroup> checkGroups;//体检套餐对应的检查组，多对多关系
//}
